<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keyword" content="">

    <title>Message</title>

    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="__PUBLIC__/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="__PUBLIC__/css/style.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet" />
    <!-- new styles-->
      <link href="__PUBLIC__/css/xxxstyle.css" rel="stylesheet" />

      <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="__PUBLIC__/js/html5shiv.js"></script>
      <script src="__PUBLIC__/js/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>
  	<section id="container" class="">
      <!--main content start-->
        <section id="main-content">
			<section class="wrapper site-min-height textcenter">
              <!-- page start-->
              <section class="panel collisionReport">
			    <!-- Main content -->  
	    		<div id="ajaxdetail"></div>
		         <if condition="$type eq 0">
		        	<section class="panel-body inputMsgBox">
		                <textarea class="form-control" rows="4" placeholder="请输入内容(100字内)" name="content" maxlength="100"></textarea>                                
		          		<button type="submit" class="btn btn-submit pull-right margin" onclick="recle()">发送</button>
		        	</section>  
		        </if>  	
			  </section>
			</section>
		</section>
      <!--main content end-->
  </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="__PUBLIC__/js/jquery.js"></script>
    <script src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="__PUBLIC__/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="__PUBLIC__/js/jquery.scrollTo.min.js"></script>
    <script src="__PUBLIC__/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="__PUBLIC__/js/jquery.customSelect.min.js" ></script>

    <!--common script for all pages-->
    <script src="__PUBLIC__/js/common-scripts.js"></script>
     <script type="text/javascript" src="__PUBLIC__/js/layer/layer.js"></script>   
    <!--new script for this page only-->
	<script>
	  //重点，每隔一段时间去服务器获取数据
		  var type = {$type};
		  if(type == 0){
			 window.setInterval("ajax_get_table()",5000);
		  }
	    $(document).ready(function(){
	        ajax_get_table();
	    });
		// ajax 抓取页面
		function ajax_get_table(){
		    var res = {$res};
		    if(res == '' || res==undefined){
				layer.msg('数据有误,请返回重试', {icon: 1,time: 2000}); 
		        return;
			}
		        $.ajax({
		            type : "POST",
		            url:'__URL__/ajaxdetail',
		            data : {res:res},
		            success: function(data){
		            	if(data.status==0){
							layer.alert(data.info, {icon: 2});
							return;
						 }
		                $("#ajaxdetail").html('');
		                $("#ajaxdetail").append(data);
		                $("#drop",window.parent.document).load("/Index/ajaxmes #drop li");
		            }
		        });
		}
	</script>
  </body>
</html>